<template>
    <div v-if="isShow" :class="[{'success':type==='success'},{'waring':type==='waring'}]">
        <span>{{msg}}</span>
    </div>
</template>

<script>
export default {
    data(){
        return {
            isShow:true,
            msg:'',
            type:''
        }
    }
}
</script>
<style>
  
    .waring{
        background: red;
    }

    .success{
        background: green;
    }

</style>
